﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*********************************************************
 * 命名空间 Simple.Tools.Convert
 * 接口名称 PageMessage
 * 开发人员：ADMIN
 * 创建时间：2024/1/5 16:46:53
 * 描述说明：
 * 更改历史：
 * 
 * *******************************************************/
namespace Simple.Tools
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PageMessage<T> : BaseMessage
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="code"></param>
        /// <param name="status"></param>
        /// <param name="Data"></param>
        public PageMessage(string msg, int code, bool status, SImplePageList<T> Data)
         : base(msg, code, status)
        {
            data = Data;
            total = data.TotalCount;
            PageSize = data.PageSize;
            totalPage = data.TotalPages;
            currentPage = data.CurrentPage;

        }
        /// <summary>
        /// 
        /// </summary>
        public SImplePageList<T> data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int total { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int totalPage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int currentPage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int PageSize { get; set; }
    }
}
